<script type="text/javascript" src="${base}/scripts/cggl/bgcgdcontent.js"></script>
<form id="bgCgdglForm" method="post" class="easyui-tabs" fit="true">
<input name="cgd.id" type="hidden" value="${(cgd.id)!''}"/>
<input type="hidden" id="cgd_ewmtime" value="${(ewmtime)!}"/>
<input type="hidden" id="htId_content" name="cgd.cght.id" value="${(htId)!}"/>
<input type="hidden" id="htmxIds_content" value="${(htmxIds)!}"/>
<input type="hidden" id="wzggIds_content" value="${(wzggIds)!}"/>
<input type="hidden" id="jhsls_content" value="${(jhsls)!}"/>
<input type="hidden" name="hzmxIds" value="${(hzmxIds)!}"/>
<input type="hidden" name="cgd.zt" value="${(cgd.zt)!}"/>

<div title="采购单" style="height: 100%;overflow-y: auto">
    <table id="table_bgCgdContent" style="width:98%;margin: 5px;" class="tb tab-t t-bor">
        <col width="80px"/>
        <col width=""/>
        <col width="80px"/>
        <col width=""/>
        <col width="80px"/>
        <col width=""/>
        <tr>
            <input id="cgd_cgdh_hidden" type="hidden" name="cgd.cgdh" value="${(cgd.cgdh)!}"/>
            <th style="font-size:14px;font-weight:bold">采购单号：</th>
            <td colspan="3" id="cgd_cgdh" style="font-size:14px;font-weight:bold">${(cgd.cgdh)!}
            </td>

            <th style="color:#f45212;">采购时间：</th>
            <td id="cgd_cgsj"><input style="width:130px" name="cgd.cgsj" class="easyui-datebox input-text"
                                     value="<#if cgd.id??>${(cgd.cgsj?date)!}<#else>${sysdate?date}</#if>"/></td>
        </tr>
        <tr>
            <input type="hidden" name="cgd.cglx" value="${(cgd.cglx)!}"/>
            <input type="hidden" id="cgd_gys_id" name="cgd.gys.id" value="${(cgd.gys.id)!}"/>
            <input type="hidden" id="cgd_lj_id" name="cgd.lj.id" value="${(cgd.lj.id)!}"/>
        <#if htType??&&htType == "cgrk">
            <th style="font-size:14px;font-weight:bold">采购合同：</th>
        <#else>
            <#if htType == "tpcght">
                <th style="font-size:14px;font-weight:bold">统配合同：</th>
            <#else>
                <th style="font-size:14px;font-weight:bold">保供合同：</th>
            </#if>
        </#if>
            <td id="cgd_cght_htbm" style="font-size:14px;font-weight:bold">${(cgd.cght.htbm)!}</td>
            <input type="hidden" id="htType_id" value="${(htType)!}"/>
            <th style="font-size:14px;font-weight:bold">采购类型：</th>
            <td id="cgd_cglx" style="font-size:14px;font-weight:bold">
                保供采购
            </td>

            <th style="font-size:14px;font-weight:bold">供应商：</th>
            <td id="cgd_gys_mc" style="font-size:14px;font-weight:bold">${(cgd.gys.jc)!}</td>
        </tr>
        <tr>
            <input type="hidden" name="cgd.sbgs.id" value="${(cgd.sbgs.id)!}"/>
            <th style="font-size:14px;font-weight:bold">申报公司：</th>
            <td id="cgd_wlfgs_mc" style="font-size:14px;font-weight:bold">${(cgd.sbgs.jc)!}</td>

            <input type="hidden" name="cgd.sbbm.id" value="${(cgd.sbbm.id)!(ZgjgId)}"/>
            <th style="font-size:14px;font-weight:bold">申报部门：</th>
            <td id="cgd_wlfbm_mc" style="font-size:14px;font-weight:bold">${(cgd.sbbm.qc)!(ZgjgXm)}</td>

            <input type="hidden" name="cgd.sbr.id" value="${(cgd.sbr.id)!(CurrentYgId)}"/>
            <th style="font-size:14px;font-weight:bold">申报人：</th>
            <td id="cgd_wlfry_mc"
                style="font-size:14px;font-weight:bold">${(cgd.sbr.xm)!(CurrentYgXm)}</td>
        </tr>
        <tr>
            <input type="hidden" name="cgd.cggs.id" value="${(cgd.cggs.id)!}"/>
            <th style="font-size:14px;font-weight:bold">采购公司：</th>
            <td id="cgd_cggs_mc" style="font-size:14px;font-weight:bold">${(cgd.cggs.jc)!}</td>
            <th>发货单位：</th>
            <td>
                <input id="cgd_fhgs_id" name="cgd.fhgs.id" type="text" value="${(cgd.fhgs.id)!}"
                       class="input-text"/>
            </td>
            <th>发货日期：</th>
            <td id="cgd_fhrq"><input style="width:130px" name="cgd.fhrq" class="easyui-datebox input-text"
                                     value="<#if cgd.id??>${(cgd.fhrq?date)!}<#else>${sysdate?date}</#if>"/></td>
        </tr>
        <tr>
            <th>计划到货日期：</th>
            <td id="cgd_jhdhrq"><input style="width:130px" name="cgd.jhdhrq" class="easyui-datebox input-text"
                                       value="<#if cgd.id??>${(cgd.jhdhrq?date)!}<#else>${datetime?date}</#if>"/>
            </td>
            <th>承运单位：</th>
            <td><input id="cgd_ysdw_id" name="cgd.ysdw.id" type="text" value="${(cgd.ysdw.id)!}"
                       class="input-text"/></td>
            <th>承运号：</th>
            <td><input id="cgd_cyh" name="cgd.cyh" type="text" style="width:130px" value="${(cgd.cyh)!}"
                       class="input-text"/></td>
        </tr>
        <tr>
            <th>到货仓库：</th>
            <td>
                <input id="cgd_dhck_id" name="cgd.dzck.id" type="text"
                       value="<#if cgd??>${(cgd.dzck.id)!}<#else>${dzckId}</#if>"
                       class="input-text" required="true"/></td>
            <th>联系电话：</th>
            <td><input id="cgd_lxrdh_id" style="width:98%" name="cgd.lxrdh" type="text"
                       value="${(cgd.lxrdh)!}"
                       class="input-text"/></td>
            <th>税率(%)：</th>
            <td><input id="cgd_sl" name="cgd.sl" style="width:130px" class="easyui-combobox input-text" type="text"
                       data-options="precision:4,min:0,max:100" value="${(cgd.sl)!}"/></td>
        </tr>
        <tr>
            <th>备注：</th>
            <td colspan="5"><textarea name="cgd.bz" cols="45" class="textarea"
                                      style="width: 100%">${(cgd.bz)!}</textarea></td>
        </tr>
    </table>
</div>
<div title="采购明细">
    <table id="cgd_mx">
    </table>
</div>
<div title="关联费用">
    <div id="cgdgl_cgdfy_toolbar">
        <div class="PTools">
            <ul class="niu">
                <li><a id="cgd_content_glfy_add" href="javascript:void(0);" plain="true">新增</a></li>
                <li><a id="cgd_content_glfy_del" href="javascript:void(0);" class="del" plain="true">删除</a></li>
            </ul>
        </div>
    </div>
    <table id="cgd_fy">
    </table>
</div>
<div title="采购单打印">
    <div id="cgddy-toolbar">
        <div class="PTools">
            <ul class="niu">
                <li><span class="xuan">选择打印机：</span>
                    <select class="ze" name="" style="">
                        <option>——默认——</option>
                    </select>
                </li>
                <li><a class="she" href="javascript:void(0);" onclick="cgd_checkIsInstall()">检查插件</a></li>
                <li><a class="watch" href="javascript:void(0);" onclick="cgd_printPreview()">打印预览</a></li>
                <li><a class="pen" href="javascript:void(0);" onclick="cgd_print()">打印</a></li>
            </ul>
        </div>
        <div id="cgddy_id">
            <object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0>
                <embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0
                       pluginspage="install_lodop32.exe"></embed>
            </object>

            <div id="cgddy_print_id" class="textcon">
                <table class="tb" style="width: 100%;font-size:13px;">
                    <colgroup>
                        <col width="10%;"/>
                        <col width="25%"/>
                        <col width="15%;"/>
                        <col width="20%"/>
                        <col width="12%;"/>
                        <col width="23%"/>
                    </colgroup>
                    <tbody>
                    <tr>
                        <th rowspan="2">收货单位:</th>
                        <td rowspan="2"><input class="input-tian" readonly="readonly"
                                               value="${(cgd.cggs.qc)!}"/></td>
                        <td rowspan="3" colspan="2" style="text-align: center;font-size: 18px">${(cgd.cggs.jc)!}
                            采购单(采购-收条)
                        </td>
                        <th>采购单编号:</th>
                        <td><input class="input-tian" readonly="readonly"
                                   value="${(cgd.cgdh)!}"/></td>
                    </tr>
                    <tr>

                        <th>制单日期:</th>
                        <td><input class="input-tian" readonly="readonly"
                                   value="<#if cgd??>${(cgd.dateCreated?date)!}</#if>"/></td>
                    </tr>
                    <tr>
                        <th>供货单位:</th>
                        <td><input class="input-tian" readonly="readonly"
                                   value="${(cgd.gys.qc)!}"/></td>
                        <th>要求采购日期:</th>
                        <td><input class="input-tian" readonly="readonly"
                                   value="${(cgd.jhdhrq?date)!}"/></td>
                    </tr>
                    </tbody>
                </table>
            </div>

            <div id="cgddy_cgd_id" class="textcon"></div>

            <div id="cgddy_print_end" class="textcon">
                <table class="tb" style="width: 100%;font-size:13px;">
                    <colgroup>
                        <col width="10%;"/>
                        <col width="15%"/>
                        <col width="10%;"/>
                        <col width="15%"/>
                        <col width="10%;"/>
                        <col width="15%"/>
                        <col width="13%;"/>
                        <col width="12%"/>
                    </colgroup>
                    <tbody>
                    <tr>
                        <th>制&nbsp;单&nbsp;人:</th>
                        <td>
                            <input class="input-tian" readonly="readonly"
                                   value="<#if cgd??>${(cgd.createUser.xm)!}</#if>"/></td>
                        <th>收&nbsp;货&nbsp;人:</th>
                        <td>
                            <input class="input-tian" readonly="readonly" value="<#if cgd??>${(cgd.rkr.xm)!}</#if>"/>
                        </td>
                        <th>验&nbsp;收&nbsp;组:</th>
                        <td>
                            <input class="input-tian" readonly="readonly" value="<#if cgd??>${(cgd.ysr.xm)!}</#if>"/>
                        </td>
                    </tr>
                    <tr>
                        <th>备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:</th>
                        <td colspan="7">
                            <input class="input-tian" readonly="readonly" />
                        </td>
                    </tr>
                    <tr>
                        <th></th>
                        <td colspan="7"><span
                                style="margin-left: 400px;">${(CurrentTime?string('yyyy-MM-dd HH:mm:ss'))!}</span></td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
</form>